package wheel;

import java.util.ArrayList;

public class Wheel {
	
	ArrayList<Wedge> wedges = new ArrayList<Wedge>();

	public Wheel(int wheelNumber) {
		switch (wheelNumber)
		{
		case 1: 
			initialize1();
			break;
		case 2: 
			initialize2();
			break;
		}
	}

	public Wedge spin() {		
		return wedges.get((int) (Math.random()*(this.wedges.size())));
	}
	
	void initialize1() {
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 300));     //  1 
		this.wedges.add(new Wedge(Game.WedgeAction.BANKRUPT, 0));    //  2 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 2500));    //  3
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 400));     //  4
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 900));     //  5
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 700));     //  6
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 300));     //  7
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 400));     //  8
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 550));     //  9
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 400));     // 10		
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 500));     // 11 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 400));     // 12
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 600));     // 13
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 350));     // 14 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 800));     // 15 
		this.wedges.add(new Wedge(Game.WedgeAction.BANKRUPT, 0));    // 16 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 600));     // 17 
		this.wedges.add(new Wedge(Game.WedgeAction.FREE_PLAY, 500)); // 18
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 700));     // 19 
		this.wedges.add(new Wedge(Game.WedgeAction.LOSE_TURN, 0));   // 20 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 800));     // 21 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 1000));    // 22
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 450));     // 23 
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 700));     // 24 
	}
	
	void initialize2() {
		this.wedges.add(new Wedge(Game.WedgeAction.MONEY, 600));       // 1 
		this.wedges.add(new Wedge(Game.WedgeAction.FREE_PLAY, 500));    // 2

	}
}
